package edu.jptest.serviceImp;

import edu.jptest.bean.QuestionContent;
import edu.jptest.dao.QuestionContentDAO;
import edu.jptest.service.IQuestionContentService;

public class QuestionContentService implements IQuestionContentService {

	// 插入题干�������
	public boolean insertQuestionContent(QuestionContent questioncontent) {
		QuestionContentDAO questionContentDao = new QuestionContentDAO();
		return questionContentDao.insertQuestionContent(questioncontent);
	}

	// 删除题干
	public boolean deleteQuestionContent(int questionContentId) {
		QuestionContentDAO questionContentDao = new QuestionContentDAO();
		return questionContentDao.deleteQuestionContent(questionContentId);
	}

	// 修改题干������
	public boolean modifyQuestionContent(QuestionContent questioncontent) {
		QuestionContentDAO questionContentDao = new QuestionContentDAO();
		return questionContentDao.updateQuestionContent(questioncontent);
	}

	// 通过题干id，查询题干对象��ɶ���
	public QuestionContent getQuestionContentByQuestionContentId(
			int questionContentID) {
		QuestionContentDAO questionContentDao = new QuestionContentDAO();
		return questionContentDao
				.getQuestionContentByQuestionContentId(questionContentID);
	}
	
	// 通过题干内容，查询题干ID
	public int getQuestionContentIdByContent(String question_content){
		QuestionContentDAO questionContentDao = new QuestionContentDAO();
		return questionContentDao.getQuestionContentIdByContent(question_content);
	}

}
